package PublishingRealize;

public class PublishedPoint {
        private int x, y;

        private PublishedPoint(int[] a) {
                this(a[0], a[1]);
        }

        public PublishedPoint(PublishedPoint p) {
                this(p.get());
        }

        public PublishedPoint(int x, int y) {
                this.x = x;
                this.y = y;
        }

        public synchronized int[] get() {
                return new int[] { x, y };
        }

        public synchronized void set(int x, int y) {
                this.x = x;
                this.y = y;
        }

}